package com.lgmshare.k3.http;

import com.lgmshare.k3.http.base.SimpleCallback;
import com.lgmshare.k3.http.base.SimpleTask;
import com.lgmshare.k3.model.UserInfo;

public class AppService {

    private static AppService Instance = new AppService();

    private AppService() {
    }

    public static AppService Instance() {
        return Instance;
    }

    public void login(Object tag, String username, String password, SimpleCallback<UserInfo> callback) {
        SimpleTask task = new SimpleTask<UserInfo>();
        task.setRequestUrl(HttpClientApi.URL_USER_LOGIN);
        task.putRequestParams("username", username);
        task.putRequestParams("password", password);
        task.setRequestCallback(callback);
        task.sendPost(tag);
    }
}
